1. Field of the Invention
The present invention relates to a technology of coding and decoding moving pictures by using motion compensation prediction and, more particularly, to a moving picture coding device, a moving picture coding method and a moving picture coding program, and a moving picture decoding device, a moving picture decoding method and a moving picture decoding program that code and decode motion information used in motion compensation prediction.
2. Description of the Related Art
Motion compensation prediction is used in commonly-used moving-picture compression coding. Motion compensation prediction is a technology of partitioning a target picture into small blocks and generating, as a prediction signal, a signal located a position moved from a target block of the target picture to a reference block of a reference picture based on the amount of motion indicated by a motion vector, the reference picture being a decoded picture. Motion compensation prediction includes uni-prediction performed using a single motion vector and bi-prediction performed using two motion vectors.
Regarding motion vectors, a motion vector of a coded block neighboring a target block is set to be a motion vector predictor (also simply referred to as “vector predictor”), and a difference between a motion vector of the target block and the vector predictor is obtained and transmitted as a coding vector so as to improve compression efficiency.
Moving-picture compression coding such as MPEG-4AVC/H.264 (hereinafter, MPEG-4AVC) allows for highly-accurate motion compensation prediction by making the size of a block used for motion compensation to be small with variations. On the other hand, there is a problem that the code size of a coding vector becomes large when reducing the size of the block.
Thus, in MPEG-4AVC, the continuity of motion in a temporal direction is focused, and motion compensation prediction in a temporal direct mode is used where motion compensation is achieved, without transmitting coding vectors, by scaling a motion vector of a block on a reference picture that is located at the same position as a target block according to an inter-frame distance and using the scaled motion vector as a motion vector of the target block, the reference picture being a processed picture different from a target picture on which the target block is located. This allows for a reduction in a code size of a motion vector, achieving improvement in coding efficiency.
Also, focusing on the continuity of motion in a spatial direction, Patent document 1 discloses a method of achieving motion compensation prediction, without transmitting coding vectors, by using a motion vector of a processed block neighboring a target block as a motion vector of the processed block.
[Patent document 1] JP 10-276439
In the derivation of a motion vector in a temporal direction such as that defined in the above-stated MPEG-4AV, scaling is required at the time of the derivation, and complicated operations thus become necessary. In the method described in Patent document 1, a motion vector of a processed block neighboring a target prediction block is used as a motion vector of the target prediction block, and in the case of performing motion compensation prediction collectively on a plurality of neighboring prediction blocks, a parallel motion prediction process may not be performed.